package org.softwarer.email.controller;

import jakarta.annotation.Resource;
import org.softwarer.email.service.EMailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * {@code @Author} 郝学胜
 * {@code @Date} 2025/11/13 15:44
 * {@code @Description}
 */
@RestController
@RequestMapping("/email")
public class EMailController {

    @Resource
    private EMailService emailService;

    @GetMapping("/test")
    public String sendEmail() {
        emailService.sendEmail("1078244513@qq.com", "杨华伟的测试程序", "杨华伟的测试程序 ... ... ");
        return "Email sent successfully!";
    }
}
